﻿#pragma once
#include "ZuiLib.h"
#include "LRefObject.h"

namespace ZuiLib {

class LBubbleList :public LRefObject<ZBubbleList>
{
public:

	int sendMsg(LuaFuncState& L)
	{
        ZRefCountedPtr<ZMsg> msg(new ZTxtMsg);
        msg->align = ZMsg::AT_RIGHT;
        msg->content = "<xml><txt><![CDATA[";
        msg->content.Append(L.arg(0).toString());
        msg->content.Append("]]></txt></xml>");
        msg->head = "res='head/head.png'";
        pThis->AppendMsg(msg);
        pThis->Reload();
        pThis->EndDown();
        return 0;
	}

	int reload(LuaFuncState& L)
	{
		pThis->Reload();
		return 0;
	}

	BEGIN_MAP_FUNC(LBubbleList)
		DECLARE_FUNC(sendMsg),
		DECLARE_FUNC(reload),
	END_MAP_FUNC
};


}//namespace
